<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        /* 
        回调函数嵌套回调函数,就会形成回调地狱
        代码层层嵌套,程序就会变得难以维护
        代码臃肿,可读性差,耦合度高
        */
        console.log('请求获取A数据');
        setTimeout(() => {
            console.log('A数据获取成功');
            console.log('请求获取B数据');
            setTimeout(() => {
                console.log('B数据获取成功');
                console.log('请求获取C数据');
                setTimeout(() => {
                    console.log('C数据获取成功');
                }, 1000);
            }, 1000);
        }, 1000);
    </script>
</body>
</html>